<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script type="text/javascript" src="../js/common.js?id=0002" ></script>
		<script type="text/javascript" src="../js/rem.js" ></script>
		<script type="text/javascript" src="../js/jquery-1.11.0.js" ></script>
		<script type="text/javascript" src="../js/aikxian-common.js" ></script>
		<script type="text/javascript" src="../js/Base64.min.js" ></script>
		<style>
			*{
				margin:0;
				padding:0;
			}
			
			.main{
				padding:0.2rem;
				height:auto;
				font-size: 0.3rem;
				text-align:center;
			}
			.img{
				display:inline-block;
				width:100%;
				margin-bottom: 0.5rem;
			}
		</style>
	</head>
	<body>
		<div class="main"></div>
		<script>
			$(window).load(function(){
				
				var prodId=$.getUrlParam('prodId');
				var prodCode=$.getUrlParam('prodId');
				var userId=$.getUrlParam('userId');
				var type=$.getUrlParam('type');
//				alert('prodId='+prodId+'userId'+userId+'typeId'+typeId);
				var str="{'prodCode':'"+prodCode+"','type':'"+type+"'}";
				str = Base64.encode(str);
				var interFace='';
				
				if(type==1){
					//1 PPT
					interFace="get_product_train";
				}else if(type==2){
					 //2 录音
					interFace="get_product_train";
				}else if(type==3){
					 //3 视频
					interFace="get_product_train";
				}else if(type==4){
					//4 Q&A
					interFace="get_product_train";
				}else if(type==5){
					// 5 一页通
					interFace="get_product_train";
				}else if(type==6){
					 //6 亮点提炼
					interFace="get_product_train";
				}else if(type==7){
					 //7 案例集锦
					interFace="get_product_train";
				}else if(type==8){
					//8 相关软文 
					interFace="get_product_train";
				}
				
				//
//				var str="{'prodId':'1448','type':'2'}";
//				str = Base64.encode(str);
				jQuery(function(){
					jQuery.ajax({
						url:make_img,
						type:"post",
						dataType:"text",
						data:{commonURL:make_img,"opName":interFace,'param':str,'osFlag':'5'},
						async:false,
						success:function(serverinfo){
							console.log(serverinfo);
							var Data=decodeURI(Base64.decode(serverinfo));
					
							Data=JSON.parse(Data);
							console.log(Data);
							
							if(Data.retCode==0){
								console.log(Data.content);
//								if(type==3){
//									var	video='	<video style="width:100%;height:400px;" controls poster="'+Data.content[0].value+'"></video>' ;
//									$(".main").html(video);
//								}else if(type==2){
//									var	video='	<video style="width:100%;height:400px;" controls poster="'+Data.content[0].value+'"></video>' ;
//									$(".main").html(video);
//								}else{
//									for(var i=0;i<Data.content.length;i++){
//										var $img=$('<img src="'+Data.content[i].value+'"class="img"/>');
//										$('.main').append($img);
//									}
//								}
								if(Data.content){
									if(Data.content.length!=0){
										for(var i=0;i<Data.content.length;i++){
											var $img=$('<img src="'+Data.content[i].value+'"class="img"/>');
											$('.main').append($img);
										}
									}else{
										$(".main").html('后台小伙伴暂未上传')
										$(".main").css({"text-align":"center","line-height":"4rem","color":"#666","font-size":"0.5rem"});
									}
								}else{
									$(".main").html('后台小伙伴暂未上传')
									$(".main").css({"text-align":"center","line-height":"4rem","color":"#666","font-size":"0.5rem"});
								}
									
								
//								
							}else{
								$(".main").html('暂无数据')
							};
							
						}
					});
				});
				
			//====		
	});
		</script>
	</body>
</html>
